// 并添加这个内部类
using Nacos.V2;

using Shares.Infrastructure.Nacos;

internal class ConfigurationListener : IListener
{
    private readonly ConfigurationListenerBase _parent;
    private readonly string _dataId;
    private readonly string _group;

    public ConfigurationListener(ConfigurationListenerBase parent, string dataId, string group)
    {
        _parent = parent;
        _dataId = dataId;
        _group = group;
    }

    public void ReceiveConfigInfo(string configInfo)
    {
        _ = Task.Run(async () => await _parent.OnConfigurationChanged(_dataId, _group, configInfo));
    }
}